Propagate accessible-role to backend
authorMatthias Clasen <mclasen@redhat.com>
Wed, 4 Nov 2020 16:53:07 +0000 (11:53 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 4 Nov 2020 16:53:07 +0000 (11:53 -0500)
We want to allow setting the accessible role as long
as the context is unrealized, so we need to propagate
the new role.

gtk/gtkwidget.c

index 9c4f78ad57dff36dfeba89e1d3788b5339b72615..e81488c4fb4def9655a99959046dea382d4c28e5 100644 (file)
@@ -1734,6 +1734,8 @@ gtk_widget_set_property (GObject         *object,
       if (priv->at_context == NULL || !gtk_at_context_is_realized (priv->at_context))
         {
           priv->accessible_role = g_value_get_enum (value);
+          if (priv->at_context)
+            g_object_set (priv->at_context, "accessible-role", priv->accessible_role, NULL);
           g_object_notify_by_pspec (object, pspec);
         }
       else